import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询列表
export function listUser(query) {
  return request({
    url: '/system/dangkou/list',
    method: 'get',
    params: query
  })
}

// 查询列表
export function listAll() {
  return request({
    url: '/system/dangkou/listAll',
    method: 'get',
    params: {}
  })
}

// 查询列表
export function listByAdmin(query) {
  return request({
    url: '/system/dangkou/listByAdmin',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getUser(userId) {
  return request({
    url: '/system/dangkou/' + parseStrEmpty(userId),
    method: 'get'
  })
}

// 新增
export function addUser(data) {
  return request({
    url: '/system/dangkou',
    method: 'post',
    data: data
  })
}

// 修改
export function updateUser(data) {
  return request({
    url: '/system/dangkou',
    method: 'put',
    data: data
  })
}

// 删除
export function delUser(userId) {
  return request({
    url: '/system/dangkou/' + userId,
    method: 'delete'
  })
}



